package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DagLagMapper;
import com.ruoyi.system.domain.DagLag;
import com.ruoyi.system.service.IDagLagService;

/**
 * 查询延迟测试Service业务层处理
 * 
 * @author NovaTian
 * @date 2022-05-12
 */
@Service
public class DagLagServiceImpl implements IDagLagService 
{
    @Autowired
    private DagLagMapper dagLagMapper;

    /**
     * 查询查询延迟测试
     * 
     * @param uuid 查询延迟测试主键
     * @return 查询延迟测试
     */
    @Override
    public DagLag selectDagLagByUuid(String uuid)
    {
        return dagLagMapper.selectDagLagByUuid(uuid);
    }

    /**
     * 查询查询延迟测试列表
     * 
     * @param dagLag 查询延迟测试
     * @return 查询延迟测试
     */
    @Override
    public List<DagLag> selectDagLagList(DagLag dagLag)
    {
        return dagLagMapper.selectDagLagList(dagLag);
    }

    /**
     * 新增查询延迟测试
     * 
     * @param dagLag 查询延迟测试
     * @return 结果
     */
    @Override
    public int insertDagLag(DagLag dagLag)
    {
        dagLag.setUuid(IdUtils.simpleUUID());
        dagLag.setCreateTime(DateUtils.getNowDate());
        return dagLagMapper.insertDagLag(dagLag);
    }

    /**
     * 修改查询延迟测试
     * 
     * @param dagLag 查询延迟测试
     * @return 结果
     */
    @Override
    public int updateDagLag(DagLag dagLag)
    {
        dagLag.setUpdateTime(DateUtils.getNowDate());
        return dagLagMapper.updateDagLag(dagLag);
    }

    /**
     * 批量删除查询延迟测试
     * 
     * @param uuids 需要删除的查询延迟测试主键
     * @return 结果
     */
    @Override
    public int deleteDagLagByUuids(String[] uuids)
    {
        return dagLagMapper.deleteDagLagByUuids(uuids);
    }

    /**
     * 删除查询延迟测试信息
     * 
     * @param uuid 查询延迟测试主键
     * @return 结果
     */
    @Override
    public int deleteDagLagByUuid(String uuid)
    {
        return dagLagMapper.deleteDagLagByUuid(uuid);
    }
}
